-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create pre-release when release PR labelled as 'autorelease: pre-rele… #10
Create pre-release when release PR labelled as 'autorelease: pre-rele… #10
Conversation
@RobertCraigie I went with |
d6bf21e
to
f339900
Compare
f339900
to
ededd04
Compare
return labels.data.map(l => l.name); | ||
} | ||
|
||
async createLabels(labels: string[]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: what permissions are needed for this to work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, I need to check...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to be both "Issues" and/or "Pull Requests": https://docs.github.com/en/rest/overview/permissions-required-for-fine-grained-personal-access-tokens?apiVersion=2022-11-28#repository-permissions-for-pull-requests. So we should be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Can you double check with a test repo just to make sure? (I'm fairly paranoid about GitHub doing weird things)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I will double check, I don't want to break the whole CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm, that seems to work with only Pull Request or only Issues as writeable :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me, I don't have a lot of context on the code surrounding this though.
ca37f76
to
1df72dc
Compare
This pull request adds a concept of "pre-release labels" that can be used on a release PR to denotate that the github release should be created as a pre-release. The label
autorelease: pre-release
is added directly byrelease-please
when creating the PR if a pre-release is detected, but can also be added by users before merging the pull request.In addition, to ensure labels can be selected by users via the "Labels dropdown" from GitHub UI, all labels are now created for the repository if they don't exist yet, before creating a pull request.